<template>
  <div style='background: #fff'>
    <a-tabs default-active-key='1' @change='callback' style='margin: 0 10px'>
      <a-tab-pane key='1' tab='计件工资'>
        <piece-wage-com ref='pieceWageCom'></piece-wage-com>
      </a-tab-pane>
      <a-tab-pane key='2' tab='工单成本' force-render>
        <work-order-cost-com ref="workOrderCostCom"></work-order-cost-com>
      </a-tab-pane>
      <a-tab-pane key='3' tab='数据汇总'>
        <data-summary-com ref="dataSummaryCom"></data-summary-com>
      </a-tab-pane>
    </a-tabs>


  </div>
</template>
<script>
import pieceWageCom from './components/pieceWageCom.vue'
import workOrderCostCom from './components/workOrderCostCom.vue'
import dataSummaryCom from './components/dataSummaryCom.vue'

export default {
  data() {
    return {}
  },
  components: {
    pieceWageCom,
    workOrderCostCom,
    dataSummaryCom
  },
  created() {

  },
  methods: {
    callback(e) {
      switch (e) {
        case '1':
          this.$refs.pieceWageCom.requestData()
          break
        case '2':
          this.$refs.workOrderCostCom.requestData()
          break
        case '3':
          this.$refs.dataSummaryCom.requestData()
          break

        default:
          break
      }
    }
  }
}
</script>
<style scoped lang='less'></style>
